<template>
  <div class="page-account scroll-box">
    <Window />
    <el-scrollbar>
      <Header :user="userInfo" v-if="userInfo.name" />
      <div class="content">
        <router-view v-if="userInfo.name" />
      </div>
    </el-scrollbar>
  </div>
</template>

<script>
import app from '@/app'
import accountModel from '@/model/account'

import Window from '@/components/window'
import Header from './header'

export default {
  components: {
    Window,
    Header
  },
  setup() {
    // 用户信息
    const userInfo = accountModel.data

    // 引导插件
    app.plugin.boostrap('main')

    return {
      lang: app.lang,
      money: app.money,
      userInfo
    }
  }
}
</script>